package com.wpp.mq.rocketmq.springbootconsumer.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: WangPengPeng
 * @create: 2021-12-04 11:43
 **/
@Slf4j
@Component
@RocketMQMessageListener(topic = "tp_rocket_003", selectorExpression="hello_tag_003",consumerGroup = "consumer_grp_03")
public class MyRocketTagListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        // 处理broker推送过来的消息
        log.info("topic: tp_rocket_001 message :{}",message);

    }
}
